﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace 实验三
{
    public partial class _3_5 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
           
        }

        protected void GridView1_SelectedIndexChanged1(object sender, EventArgs e)
        {
            DataClasses1DataContext db = new DataClasses1DataContext();
            var x = (from s in db.Student
                     where s.id == GridView1.SelectedValue.ToString()
                     select s).First();
            Label1.Text = x.id + " " + x.name + " " + x.sex + " " + x.sclass + " " + " " + x.img;
        }
    }
}